package com.tedu.demo3;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.sql.SQLOutput;

public class Demo {
    private static Person p = new Person();
    public static String name;
    public static void main(String[] args) {
        System.out.println(p);

        UserDAO userDAO = new UserDAO();
        System.out.println(userDAO);

        AnnotationConfigApplicationContext context =
                new AnnotationConfigApplicationContext("com.tedu.demo3");
        UserDAO user = context.getBean(UserDAO.class);
        System.out.println(user);
        Person person = context.getBean(Person.class);
        System.out.println(person);
    }

}
